#ifndef NETADDR_HEADER_
#define NETADDR_HEADER_

#include <winsock2.h>
#include <windows.h>
#include "StringUtil.h"

struct NetAddr
{
	NetAddr():port(0)
	{
	}
	
	NetAddr(const char* _addr,unsigned short _port)
	:port(_port)
	{
		memcpy(addr,_addr,32);
	}

	NetAddr(const wchar_t* _addr,unsigned short _port)
	:port(_port)
	{
		std::string& str = StringUtil::wideCharToString(_addr);
		memcpy(addr,str.c_str(),str.size());
	}
	unsigned short port;
	char addr[32];
};


#endif